#ifndef _PIC_HPP_
#define _PIC_HPP_
namespace pic        
{
  void                     init        ();
  void                     outb        (type::u16 port, type::u8 value);  
  type::u8                 inb         (type::u16 port);
  namespace master
  {
    static inline type::u32 cmd_port    ()        {return 0x0020;}    // master command port
    static inline type::u32 data_port   ()        {return 0x0021;}    // master data    port
    static inline type::u32 icw1        ()        {return 0x0011;}    // icw = initialization command word
    static inline type::u32 icw2        ()        {return irq::intv_irq<0>();} 
    static inline type::u32 icw3        ()        {return 0x0004;}
    static inline type::u32 icw4        ()        {return 0x0001;}
  }
  namespace slave
  {
    static inline type::u32 cmd_port    ()        {return 0x00A0;}    // slave  command port  
    static inline type::u32 data_port   ()        {return 0x00A1;}    // slave  data    port
    static inline type::u32 icw1        ()        {return 0x0011;}       
    static inline type::u32 icw2        ()        {return irq::intv_irq<8>();}
    static inline type::u32 icw3        ()        {return 0x0002;}
    static inline type::u32 icw4        ()        {return 0x0001;}
  }
}
#endif
